<?php

namespace App\Model;



class UserCloud extends BaseModel
{
    protected $table = 'cloud_user';

    public function getUserStatus($id_cards){
        $res = self::whereIn('id_card', $id_cards)
            ->get(['id_card', 'status']);
        return $this->objToArray($res) ?? [];
    }


    /**获取云账户注册的个体账户信息
     * @param $userId
     * @return mixed
     */
    public function getCloudUserByUserId($userId){
        $cloudUser = self::query()
            ->where('user_id' ,$userId)
            ->first();
        return $this->objToArray($cloudUser);
    }

}
